<template>
	<view class="con-box">
		<view class="top">

		</view>
		<view class="ddlb">
			<view class="dd" v-for="(time,index) in car_lists" :key="time.id">
				<view class="dd-top">
					<view class="dd-q">
						运单编号：{{time.waybill_sn || ''}}
					</view>
					<view class="dd-p">
						{{statusText(time.status)}}
					</view>
				</view>
				<view class="dd-dd">
					<p>增加金额：{{time.amount || ''}}</p>
					<p>车牌号：{{time.car_plate || ''}}</p>
					<p>申请原因：{{time.remark || ''}}</p>
					 
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				page: 1,
				car_lists:[],
				status_text_array: ['待审核', '通过','拒绝']
			}
		},
		onLoad() {
			this.fare_lists();
		},
		onShow() {
		},
		onReachBottom() {
			this.page++;
			this.fare_lists();
		},
		methods: {
			fare_lists()
			{
				let data = {
					page: this.page,
				}
				this.$rqt.freightaddAmountList(data).then(res => {
					this.car_lists = [...this.car_lists, ...res.data?.data];
				})
			},
			statusText(status) {
				let status_text =  this.status_text_array[status];
				return status_text;
			}

		}
	}
</script>

<style lang="scss">
	page {
		background: #F7F7F7;
	}

	.top {
		margin-top: 10rpx;
	}

	.ddlb {
		padding-bottom: 20px;
		width: 95%;
		margin: 0 auto;
	}

	.ddlb>button {
		margin-top: 20px;
		width: 100%;
		height: 50px;
		box-shadow: 0px 0px 4px 0px rgba(204, 204, 204, 0.5);
		border-radius: 8px;
		color: #fff;
		/* background: #1890FF; */
		background: #999999;
	}

	.dd {
		margin-top: 12px;
		width: 100%;
		padding-bottom: 10px;
		background: #FFFFFF;
		box-shadow: 0px 0px 6px 0px rgba(204, 204, 204, 0.5);
		border-radius: 8px;
	}

	.dd-top {
		width: 100%;
		display: flex;
		justify-content: space-between;
		border-bottom: 1px dashed #CCCCCC;
	}

	.dd-q {
		font-size: 18px;
		font-weight: 500;
		margin-left: 20px;
		line-height: 50px;

	}

	.dd-p {
		font-size: 18px;
		color: #1890FF;
		line-height: 50px;
		margin-right: 20px;
	}

	.dd-dd {
		overflow: hidden;
		width: 90%;
		margin: 0 auto;
	}

	.dd-dd>p {
		line-height: 40px;
		float: left;
		width: 50%;
		font-size: 16px;
		font-weight: 400;
	}
</style>